import axios from 'axios'
import { typesUrl } from '../../baseUrl/index'
let state = {
    isBMenu: false,
}

let mutations = {
    changeIsBMenu(state, boolen) {
        state.isBMenu = boolen
    }
}

let actions = {
    getTypes(context) {
        return new Promise(function (resolve, reject) {
            axios({
                url: typesUrl,
                method: 'get',
                params: {
                    transform: 1
                }
            })
            .then((data) => {
                resolve(data.data)
            })
        })
    }
}

export default {
    namespaced: true,
    state,
    mutations,
    actions
}